use crate::handle::user_handle;

use rocket::{ routes};
use rocket::fs::{FileServer, relative};

pub async fn start_server() -> Result<(), rocket::Error> {
    rocket::build()
        .mount("/", routes![user_handle::user_login])
        .mount("/avatars", FileServer::from(relative!("../uploads/avatars")))
        .launch()
        .await?;

    Ok(())
}